package com.ynny.two_dimensional_array01;

public class ArrayExample01 {

    public static void main(String[] args) {

        int[][] numsArray = new int[3][4];

        numsArray[0][0] = 3;
        numsArray[0][1] = 5;
        numsArray[0][2] = 8;

        numsArray[1][0] = 12;
        numsArray[1][1] = 0;

        numsArray[2][0] = 7;

        numsArray[2][2] = 6;
        numsArray[2][3] = 4;


        int sum = 0;
        for (int i = 0; i < numsArray.length; i++) {

            for (int j = 0; j < numsArray[i].length; j++) {

                sum += numsArray[i][j];
                System.out.println(numsArray[i][j]);
            }

        }

        System.out.println(sum);



    }
}
